home *** CD-ROM | disk | FTP | other *** search
/ Visual Basic Source Code / Visual Basic Source Code.iso / vbsource / scrl_cj / scroll.frm (.txt) < prev    next >
Encoding:
Visual Basic Form  |  1995-05-07  |  7.3 KB  |  227 lines

  1. VERSION 2.00
  2. Begin Form Form1 
  3.    Caption         =   "Scroll-Demo"
  4.    ClientHeight    =   3720
  5.    ClientLeft      =   2700
  6.    ClientTop       =   3810
  7.    ClientWidth     =   5820
  8.    Height          =   4125
  9.    Left            =   2640
  10.    LinkTopic       =   "Form1"
  11.    ScaleHeight     =   3720
  12.    ScaleWidth      =   5820
  13.    Top             =   3465
  14.    Width           =   5940
  15.    Begin PictureBox Picture1 
  16.       BorderStyle     =   0  'None
  17.       Height          =   5685
  18.       Left            =   -405
  19.       ScaleHeight     =   5685
  20.       ScaleWidth      =   9150
  21.       TabIndex        =   0
  22.       Top             =   630
  23.       Width           =   9150
  24.       Begin CheckBox Check4 
  25.          Caption         =   "Enable Thumbtrack"
  26.          Height          =   285
  27.          Left            =   315
  28.          TabIndex        =   15
  29.          Top             =   1305
  30.          Width           =   2625
  31.       End
  32.       Begin CheckBox Check3 
  33.          Caption         =   "Check3"
  34.          Height          =   375
  35.          Left            =   3375
  36.          TabIndex        =   14
  37.          Top             =   5130
  38.          Width           =   1140
  39.       End
  40.       Begin CheckBox Check2 
  41.          Caption         =   "Check2"
  42.          Height          =   375
  43.          Left            =   1980
  44.          TabIndex        =   13
  45.          Top             =   5130
  46.          Width           =   1050
  47.       End
  48.       Begin CommandButton Command2 
  49.          Caption         =   "End Demo"
  50.          Height          =   600
  51.          Left            =   4320
  52.          TabIndex        =   11
  53.          Top             =   315
  54.          Width           =   1500
  55.       End
  56.       Begin CheckBox Check1 
  57.          Caption         =   "Check1"
  58.          Height          =   330
  59.          Left            =   360
  60.          TabIndex        =   10
  61.          Top             =   5175
  62.          Width           =   1410
  63.       End
  64.       Begin CommandButton Command1 
  65.          Caption         =   "About"
  66.          Height          =   375
  67.          Left            =   4410
  68.          TabIndex        =   9
  69.          Top             =   1125
  70.          Width           =   1230
  71.       End
  72.       Begin PictureBox Picture2 
  73.          Height          =   2310
  74.          Left            =   2115
  75.          Picture         =   SCROLL.FRX:0000
  76.          ScaleHeight     =   2280
  77.          ScaleWidth      =   3900
  78.          TabIndex        =   8
  79.          Top             =   2295
  80.          Width           =   3930
  81.       End
  82.       Begin Frame Frame1 
  83.          Caption         =   "Frame1"
  84.          Height          =   1365
  85.          Left            =   315
  86.          TabIndex        =   4
  87.          Top             =   2205
  88.          Width           =   1725
  89.          Begin OptionButton Option3 
  90.             Caption         =   "Option3"
  91.             Height          =   285
  92.             Left            =   315
  93.             TabIndex        =   7
  94.             Top             =   900
  95.             Width           =   1275
  96.          End
  97.          Begin OptionButton Option2 
  98.             Caption         =   "Option2"
  99.             Height          =   285
  100.             Left            =   315
  101.             TabIndex        =   6
  102.             Top             =   585
  103.             Width           =   1140
  104.          End
  105.          Begin OptionButton Option1 
  106.             Caption         =   "Option1"
  107.             Height          =   285
  108.             Left            =   315
  109.             TabIndex        =   5
  110.             Top             =   270
  111.             Width           =   1095
  112.          End
  113.       End
  114.       Begin TextBox Text1 
  115.          Height          =   285
  116.          Left            =   990
  117.          TabIndex        =   3
  118.          Top             =   1800
  119.          Width           =   1500
  120.       End
  121.       Begin Shape Shape2 
  122.          FillColor       =   &H00FF00FF&
  123.          FillStyle       =   7  'Diagonal Cross
  124.          Height          =   240
  125.          Left            =   4995
  126.          Shape           =   2  'Oval
  127.          Top             =   5220
  128.          Width           =   1095
  129.       End
  130.       Begin Shape Shape1 
  131.          BackColor       =   &H008080FF&
  132.          BackStyle       =   1  'Opaque
  133.          Height          =   465
  134.          Left            =   4815
  135.          Top             =   5085
  136.          Width           =   4155
  137.       End
  138.       Begin Label Label3 
  139.          Alignment       =   2  'Center
  140.          BorderStyle     =   1  'Fixed Single
  141.          Caption         =   "This Scrolling is made by using the Messenger VBX from JOSWare. The rest is simple using of Windows API-Functions.  "
  142.          FontBold        =   -1  'True
  143.          FontItalic      =   0   'False
  144.          FontName        =   "MS Sans Serif"
  145.          FontSize        =   18
  146.          FontStrikethru  =   0   'False
  147.          FontUnderline   =   0   'False
  148.          Height          =   4740
  149.          Left            =   6120
  150.          TabIndex        =   12
  151.          Top             =   225
  152.          Width           =   2775
  153.       End
  154.       Begin Label Label2 
  155.          Caption         =   "Input:"
  156.          Height          =   195
  157.          Left            =   315
  158.          TabIndex        =   2
  159.          Top             =   1845
  160.          Width           =   600
  161.       End
  162.       Begin Label Label1 
  163.          Caption         =   "How to Scroll in Visual Basic...."
  164.          FontBold        =   -1  'True
  165.          FontItalic      =   0   'False
  166.          FontName        =   "Arial"
  167.          FontSize        =   24
  168.          FontStrikethru  =   0   'False
  169.          FontUnderline   =   0   'False
  170.          Height          =   1140
  171.          Left            =   315
  172.          TabIndex        =   1
  173.          Top             =   180
  174.          Width           =   3975
  175.       End
  176.    End
  177.    Begin PictureBox VBMsg1 
  178.       Height          =   420
  179.       Left            =   90
  180.       ScaleHeight     =   390
  181.       ScaleWidth      =   390
  182.       TabIndex        =   16
  183.       Top             =   90
  184.       Width           =   420
  185.    End
  186. Option Explicit
  187. Sub Check4_Click ()
  188.     If Check4.Value = 1 Then
  189.         
  190.         EnableThumbTrack True
  191.     Else
  192.         EnableThumbTrack False
  193.     End If
  194.     MsgBox "Drag the thumb for result !"
  195. End Sub
  196. Sub Command1_Click ()
  197. Dim sAbout As String
  198. Dim cLF As String * 1
  199.     cLF = Chr$(13)
  200.     sAbout = "Feel free to use this code and"
  201.     sAbout = sAbout + cLF + "to change it in your direction!"
  202.     sAbout = sAbout + cLF + "If you make interesting extensions, or"
  203.     sAbout = sAbout + cLF + "if you have problems with my code, plese let me know."
  204.     sAbout = sAbout + cLF + "I'm reachable as Christian J
  205. rges, CIM 100277,2551"
  206.     MsgBox sAbout
  207. End Sub
  208. Sub Command2_Click ()
  209.     End
  210. End Sub
  211. Sub Form_Load ()
  212.    ' Activate VbMsg-Control
  213.    VbMsg1.SubClasshWnd = Form1.hWnd
  214.    InitScrollPic Picture1
  215.    ' Center Form
  216.    Form1.Top = (Screen.Height - Form1.Height) / 2
  217.    Form1.Left = (Screen.Width - Form1.Width) / 2
  218. End Sub
  219. Sub Form_Resize ()
  220.     SetScrollBar Form1, Picture1
  221. End Sub
  222. Sub Form_Unload (Cancel As Integer)
  223. End Sub
  224. Sub VBMsg1_WindowMessage (hWindow As Integer, Msg As Integer, wParam As Integer, lParam As Long, RetVal As Long, CallDefProc As Integer)
  225.     Scroll Form1, Picture1, Msg, wParam, lParam
  226. End Sub
  227.